package com.lc.pianostudent.activity;

import android.os.Bundle;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;

import com.lc.pianostudent.R;
import com.lc.pianostudent.widget.BalanceCheckView;
import com.zcx.helper.bound.BoundView;

/**
 * Created by Administrator on 2018/6/22.
 */

public class PayActivity extends BaseActivity implements View.OnClickListener{
    @BoundView(R.id.wx_iamge) private BalanceCheckView wx;
    @BoundView(R.id.zfb_iamge) private BalanceCheckView zfb;
    @BoundView(value = R.id.wx_layout,isClick = true) private RelativeLayout wxLayouy;
    @BoundView(value = R.id.zfb_layout,isClick = true) private RelativeLayout zfbLayouy;
    @BoundView(value = R.id.confirm_pay,isClick = true) private LinearLayout confirm_pay;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_pay);

        setBackTrue();
        initView();
    }

    private void initView(){
        setTitleName("立即支付");
        wx.setCheck(true);
    }

    @Override
    public void onClick(View view) {
        switch (view.getId()){

            case R.id.wx_layout:

                wx.setCheck(true);
                zfb.setCheck(false);
                break;

            case R.id.zfb_layout:

                wx.setCheck(false);
                zfb.setCheck(true);
                break;

            case R.id.confirm_pay:
                finish();
                break;

        }
    }
}
